package my.consumer.demo.Feign;

import my.consumer.demo.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "userZuul",fallback = UserZuulFeignFallback.class)
@Primary
public interface UserZuulFeignClient {
    String PATH="user/";

    @GetMapping(PATH+"getUser")
    User getUser(@RequestParam String userId,@RequestParam String token);

    @PostMapping(PATH+"addUser")
    String addUser(@RequestBody User user,@RequestParam String token);
}
